package com.bawei.park2211a.person

import androidx.lifecycle.MutableLiveData
import com.bawei.base.bean.AddPersonEntity
import com.bawei.base.bean.PersonListEntity
import com.bawei.base.mvvm.BaseViewModel
import com.bawei.base.net.ApiService
import dagger.hilt.android.lifecycle.HiltViewModel
import javax.inject.Inject

@HiltViewModel
class AddPersonViewModel @Inject constructor(var apiService: ApiService) :BaseViewModel() {
    var addPersonSuccess=MutableLiveData<PersonListEntity>()
    fun addPerson(addPersonEntity: AddPersonEntity){
        httpRequest({apiService.addPerson(addPersonEntity)},{addPersonSuccess.postValue(it)})
    }
}